import Vue from 'vue'
import VueRouter from 'vue-router'


/**解决router重复报错 */
const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}


Vue.use(VueRouter)

const Individuation = () => import('../views/content/individuation/Individuation');

const AllMusicList = () => import('../views/content/musicList/allMusic')




const routes = [
    {
        path: '/',
        redirect: '/individuation'
    },
    {
        name:'individuation',
        path: '/individuation',
        component: Individuation
    },
    // {
    //     path: '/musiclistdetail/:id/:time',
    //     component: MusicListDetail
    // },
    {
        name:'allmusiclist',
        path: '/allmusiclist',
        component: AllMusicList
    },
    
    // {
    //     path: '/search-detail/:keywords',
    //     name: 'search-detail',
    //     component: SearchDetail,
    //     children: [
    //         {
    //             path: '/',
    //             redirect: 'songs'
    //         },
    //     ]
    // },
]


const router = new VueRouter({
   // mode: 'history',
    //base: process.env.BASE_URL,
    routes
  })
  
export default router